package com.itfreer.gather;

import com.itfreer.data.DataInit;
import com.itfreer.data.config.ConfigService;
import com.itfreer.utils.config.ConfigManager;

/**
 * 定义项目级app，用于初始化项目相关参数
 */
public class Application extends com.itfreer.utils.Application {

    public void onCreate() {
        super.onCreate();

        // 远程服务初始化
        ConfigService.instance.init();
        // 设置地图空间参考
        ConfigManager.setConfig("MapSpatialReference", 4490);
        // 单点登录配置单独设置

        // 远程配置
//         ConfigManager.setConfig("ssoService","http://localhost:8080/gather/");
//         ConfigManager.setConfig("HttpUrl", "http://192.168.10.14/gather");
//         ConfigManager.setConfig("DataUpload", true);

        // 本地配置
//         ConfigManager.setConfig("ssoService","http://127.0.0.1:8080/");
//         ConfigManager.setConfig("HttpUrl", "http://10.0.2.2:9090/gather");
//         ConfigManager.setConfig("DataUpload", true);

        // 龙岗配置
        ConfigManager.setConfig("ssoService","http://localhost:8080/gather/");
        ConfigManager.setConfig("HttpUrl", "http://192.168.1.106:8080/gather");
        ConfigManager.setConfig("DataUpload", true);

        // 模块初始化
        DataInit.init();
    }
}
